home *** CD-ROM | disk | FTP | other *** search
/ Tech Arsenal 1 / Tech Arsenal (Arsenal Computer).ISO / tek-01 / pdcurs21.zip / PORTABLE.ZIP / GETYX.C < prev    next >
Text File  |  1992-11-21  |  2KB  |  49 lines

  1. #define        CURSES_LIBRARY  1
  2. #include <curses.h>
  3. #undef getyx
  4.  
  5. #ifndef        NDEBUG
  6. char *rcsid_getyx = "$Header: c:/curses/portable/RCS/getyx.c%v 2.0 1992/11/15 03:28:53 MH Rel $";
  7. #endif
  8.  
  9.  
  10.  
  11.  
  12. /*man-start*********************************************************************
  13.  
  14.   getyx()      - get cursor position
  15.  
  16.   X/Open Description:
  17.        The cursor position of the window is placed in the two integer
  18.        variables y and x.  This is implemented as a macro, so no & is
  19.        necessary before the variables.
  20.  
  21.        NOTE: getyx() is a macro.
  22.  
  23.   PDCurses Description:
  24.        This routine is here to as a documentation place holder.  The
  25.        code in this module will never be executed unless you #undef
  26.        getyx(), in which case, you will need the & operator.
  27.  
  28.   X/Open Return Value:
  29.        This function returns OK on success and ERR on error.
  30.  
  31.   X/Open Errors:
  32.        No errors are defined for this function.
  33.  
  34.   Portability:
  35.        PDCurses        int getyx( WINDOW* win, int* y, int* x );
  36.            or          int getyx( WINDOW* win, int y, int x );
  37.        X/Open Dec '88  int getyx( WINDOW* win, int y, int x );
  38.        BSD Curses      int getyx( WINDOW* win, int y, int x );
  39.        SYS V Curses    int getyx( WINDOW* win, int y, int x );
  40.  
  41. **man-end**********************************************************************/
  42.  
  43. int    getyx( WINDOW *win, int *y, int *x )
  44. {
  45.        *y = win->_cury;
  46.        *x = win->_curx;
  47.        return( OK );
  48. }
  49.